<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style></style>
  </head>
  <body>
    <div id="clock">
      <span class="h">00</span>
      <span>:</span>
      <span class="m">00</span>
      <span>:</span>
      <span class="s">00</span>
    </div>
    <script>
      const h = document.querySelector("#clock .h");
      const m = document.querySelector("#clock .m");
      const s = document.querySelector("#clock .s");
      setInterval(() => {
        const d = new Date();
        h.innerText = d.getHours();
        m.innerText = d.getMinutes();
        s.innerText = d.getSeconds();
      }, 1000);
    </script>
  </body>
</html>
